﻿using FluentNHibernate.Mapping;
using HinduShop.Domain.Models;

namespace HinduShop.DbClassLib.Mappings
{
    public class StoreMap : ClassMap<Store>
    {
        public StoreMap()
        { 
            Id(x => x.Id);
            Map(x => x.Name);
            Map(x => x.Address);
            HasManyToMany(x => x.Products)
                .Cascade.All()
                .Table("StoreProduct");
        }
    }
}